/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var panorama;

function initialize() {

    // Set up Street View and initially set it visible. Register the
    // custom panorama provider function. Set the StreetView to display
    // the custom panorama 'reception' which we check for below.
    var panoOptions = {
        pano: 'reception',
        visible: true,
        panoProvider: getCustomPanorama
    }

    panorama = new google.maps.StreetViewPanorama(
        document.getElementById('pano_canvas'),panoOptions);
}

// Return a pano image given the panoID.
function getCustomPanoramaTileUrl(pano,zoom,tileX,tileY) {

    // Note: robust custom panorama methods would require tiled pano data.
    // Here we're just using a single tile, set to the tile size and equal
    // to the pano "world" size.
    return 'https://lh3.googleusercontent.com/_F4mqhEC2rU4/TSy4jlfo-gI/AAAAAAAAAE4/FpbBeHnyw0w/s912/francia.jpg';
}

// Construct the appropriate StreetViewPanoramaData given
// the passed pano IDs.
function getCustomPanorama(pano,zoom,tileX,tileY) {

    switch(pano) {

        case 'reception':
            return {
                location: {
                    pano: 'reception',
                    description: "Iglesia Francesa"
                },
                links: [
                ],
                // The text for the copyright control.
                copyright: 'Secretaría de Cultura (c) 2011',
                // The definition of the tiles for this panorama.
                tiles: {
                    tileSize: new google.maps.Size(1024, 512),
                    worldSize: new google.maps.Size(1024, 512),
                    // The heading in degrees at the origin of the panorama
                    // tile set.
                    centerHeading: 105,
                    getTileUrl: getCustomPanoramaTileUrl
                }
            };
            break;
    }
}
